U.S. Pat. No. 3,858,280 discloses a locking device where a cavity of one member contains balls for retaining a rod-shaped body. The cavity contains, furthermore, a spring retaining member that presses the balls against a side wall of the cavity. The spring is supported by a retaining ring at the bottom of the cavity. The retaining ring is, however, relatively difficult to mount in a groove in the side wall of the cavity.